#pragma once
#include"../event/Object.h"
#include"GamePlay.h"
#include<list>
#include<map>
#include<vector>

class GameMonster;

class SceneBase:public Object
{
public:
	SceneBase();
	SceneBase(Object* master, const int& sceneId);
    virtual	~SceneBase();
	
	virtual void addActor(const int& id, const int64_t& sock, const Myvec& pos, const Myvec& forward, const std::string& name);

	virtual void removeActor(const int& id);
	
	virtual void updateActorTransform(const int& id, const Myvec& pos, const Myvec& forward, const Myvec& veloci);

	virtual	void updateActorPosAndFor(const int& id, const Myvec& pos, const Myvec& foprward);

	virtual std::vector<GamePlay*> getGamePlayNearPlayers(const int& id);

	virtual int getSceneId();

	virtual void monsterFight(const int& monsterId,const int& figtId);

	virtual void update(float dt);

	void registerUpdate();

	virtual void monsterFightResult(const int& userId,const int& monsterId, const int& success);
protected:
	virtual void notifyMonster(GamePlay* play);

	Object* m_master;
	int m_sceneId;
	std::map<int, GamePlay*> m_playMap;
};
